﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects
{
    public class RestaurantTable : BusinessObject
    {
        public RestaurantTable()
        {
            AddRule(new ValidateRequired("RestaurantTableCode"));
            AddRule(new ValidateLength("RestaurantTableCode", 0, 20));

            AddRule(new ValidateRequired("RestaurantTableName"));
            AddRule(new ValidateLength("RestaurantTableName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));

            AddRule(new ValidateRequired("RestaurantAreaID"));
        }

        public RestaurantTable(string restaurantTableId, string restaurantId, string restaurantAreaId, string restaurantTableCode,
                            string restaurantTableName, string description, int maxPeople, bool isOrder, bool isOrderOnline, bool isActive)
            : this()
        {
            RestaurantTableID = restaurantTableId;
            RestaurantID = restaurantId;
            RestaurantAreaID = restaurantAreaId;
            RestaurantTableCode = restaurantTableCode;
            RestaurantTableName = restaurantTableName;
            Description = description;
            MaxPeople = maxPeople;
            IsOrder = isOrder;
            IsOrderOnline = isOrderOnline;
            IsActive = isActive;
        }

        public string RestaurantTableID { get; set; }

        public string RestaurantID { get; set; }

        public string RestaurantAreaID { get; set; }

        public string RestaurantTableCode { get; set; }

        public string RestaurantTableName { get; set; }

        public string Description { get; set; }

        public int MaxPeople { get; set; }

        public bool IsOrder { get; set; }

        public bool IsOrderOnline { get; set; }

        public bool IsActive { get; set; }
    }
}